#ifndef SCREEN_H
#define SCREEN_H

#include "StdTypes.h"
#include "Bitmap.h"
#include "Pal.h"
#include <ddraw.h>


class Bitmap;

class Screen {

private:
	
public:
	// VARIABLES

	// The DirectDraw object, used to create the Primary surface and
	// access the DirectDraw functions.

	// The primary DDraw surface, this represents the screen.
	static LPDIRECTDRAWSURFACE7 lpDDSPrimary;

	// The back buffer, things are blitted onto this then flipped to
	// the Primary surface.
	static LPDIRECTDRAWSURFACE7 lpDDSBack;

	// A surface description structure, used to describe the
	// primary and back surfaces.
	static DDSURFACEDESC2 ddsd;

	// A surface capabilities structure, used to tell
	// CreateSurface() what kind of surface to create.
	static DDSCAPS2 ddscaps;

	static LPDIRECTDRAW7 dDrawObj;

	static WORD width;
	static WORD height;
	static BYTE bit_depth;
	static HWND hwnd;

public:

	static int setMode(WORD width, WORD height, BYTE bit_depth);
	static int init(HWND hwnd);
	static int putBitmap(SDWORD x, SDWORD y, Bitmap& bitmap);
	static int putBitmapRect(SDWORD x, SDWORD y, RECT& rect, Bitmap& bitmap);
	static void dumpBuffer();
	static int setPal(Pal& paleta);
	static void setBufferTo(BYTE color);
	static void drawText(long x, long y, char* text);
	static HWND getHWnd();

	//Constructor
	Screen();
};

#endif